package com.xinqi.modules.discuss.notice.controller.inner;


import com.xinqi.common.base.response.R;
import com.xinqi.modules.discuss.notice.service.CourseNoticeService;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 课程公告主表内部控制层
 *
 * @author: wenjie
 * @date: 2023/10/30
 */
@Hidden
@RestController
@RequestMapping("/inner/course-notice")
@RequiredArgsConstructor
public class CourseNoticeInnerController {
    private final CourseNoticeService courseNoticeService;

    /**
     * 班级添加成员 -- 公告同步
     */
    @PostMapping("/class-add-members")
    public R<Boolean> classAddMembers(Long classId, Long userId) {
        Boolean boo = courseNoticeService.classAddMembers(classId, userId);
        return R.ok(boo);
    }

    /**
     * 班级成员身份转换 -- 公告同步
     */
    @PostMapping("/class-change-identity")
    public R<Boolean> classChangeIdentity(Long classId, Long userId) {
        Boolean boo = courseNoticeService.classChangeIdentity(classId, userId);
        return R.ok(boo);
    }
}
